%forked on aug 16: added specific variables to this
%directory/using_fminsearch.m
%datafromampl

% Plot of the training and the test points and the new line
mBonmin = -0.93/1.1;    cBonmin = 0.23/1.1;                     
ytBonmin = mBonmin*xt +cBonmin;

mFastSolve = -(lambda_Combined(1)/(lambda_Combined(2) + epsilonval));    cFastSolve = -lambda_Combined(3)/(lambda_Combined(2)+epsilonval);
ytFastSolve = mFastSolve*xt+cFastSolve;

plotrequired = 1;
if(plotrequired==1)
    figure; hold on;
%     pos = find(trainingdata(:,3)==1);
%     plot(trainingdata(pos,1),trainingdata(pos,2),'g.');
%     pos = find(trainingdata(:,3)==-1);  hold on; 
%     plot(trainingdata(pos, 1),trainingdata(pos, 2),'y.');
    pos = find(testdata(:,3)==1);
    plot(testdata(pos,1),testdata(pos,2),'yo');
    pos = find(testdata(:,3)==-1);  hold on; 
    plot(testdata(pos, 1),testdata(pos, 2),'mo');
    plot(xt,yt,'r');
    plot(xt,ytBonmin,'b');
    plot(xt,ytFastSolve,'g');
    axis([-3 3 -3 3]);                  hold off;
end